export function sessionStorageSet(key: string, value: any) {
  sessionStorage.setItem(key, JSON.stringify(value));
}

export function sessionStorageGet(key: string) {
  try {
    return JSON.parse(sessionStorage.getItem(key) as any);
  } catch (e) {
    return null;
  }
}

export function sessionStorageRemove(key: string) {
  sessionStorage.removeItem(key);
}

export function sessionStorageClear() {
  window.sessionStorage.clear();
}
